From 34784d695b7fbf2e190a29788ac33fdee6d63f54 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Wed, 30 Aug 2006 11:05:00 +0100 Subject: [PATCH] Further shadow_mem_control fixes -- we need to balloon the amount of memory that we're going to request i.e. the rounded-up value. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index fbb60c0c30..a7a388bbea 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1296,13 +1296,13 @@ class XendDomainInfo: shadow_kb_req = self.info['shadow_memory'] * 1024 if shadow_kb_req > shadow_kb: shadow_kb = shadow_kb_req + shadow_mb = (shadow_kb + 1023) / 1024 # Make sure there's enough RAM available for the domain - balloon.free(mem_kb + shadow_kb) + balloon.free(mem_kb + shadow_mb * 1024) # Set up the shadow memory - shadow_cur = xc.shadow_mem_control(self.domid, - (shadow_kb + 1023) / 1024) + shadow_cur = xc.shadow_mem_control(self.domid, shadow_mb) self.info['shadow_memory'] = shadow_cur # initial memory allocation -- 2.30.2